
//num1-num2*k=sum cnt     sum-
class Solution {
using LL=long long;
public:
    int makeTheIntegerZero(int num1, int num2) {
        
        LL nCnt=0;
        LL num=num1;
        while(num-num2>nCnt){
            num-=num2;
            ++nCnt;
            int cnt=0;
            for(int i=0;i<64;++i){
                if((num>>i)&1==1){
                    ++cnt;
                }
            }
            if(cnt<=num && cnt<=nCnt){
                return nCnt;
            }
        }
        return -1;
    }
};
